<script src="/static/public/jquery.js" type="text/javascript"
	charset="utf-8"></script>
<script src="/static/public/jquery-ui.js" type="text/javascript"
	charset="utf-8"></script>
<script src="/static/public/evol.colorpicker.min.js"
	type="text/javascript" charset="utf-8"></script>
<script type="text/javascript"
	src="../../static/public/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript"
	src="../../static/public/ueditor/ueditor.all.js"></script>
<!-- 语言包文件(建议手动加载语言包，避免在ie下，因为加载语言失败导致编辑器加载失败) -->
<script type="text/javascript"
	src="../../static/public/ueditor/lang/zh-cn/zh-cn.js"></script>
	<link href="../../static/public/ueditor/themes/default/css/ueditor.css" type="text/css" rel="stylesheet">
<link href="/static/public/css/evol.colorpicker.css" rel="stylesheet"
	type="text/css">
<link href="/static/public/css/jquery-ui.css" rel="stylesheet"
	type="text/css">
	<link href="../../static/bootstrap2/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
	
{literal}
<script type='text/javascript'>

$(document).ready(function(){
  
    $("#mycolor").colorpicker({
        color: "#ffc000",     
        history: false,
        displayIndicator: false
        });
    $("#mycolor").on("change.color", function(event, color){
        $('#title').css('color', color);
        var x=$("#b").attr("class");
        if(x=="b"){
            $("input[name='css']").val('color:'+color+";font-weight:bold;");
        }else{
          	 $("input[name='css']").val('color:'+color);
        }
    })
   });

			

			function apd(t){
    var htm='<input type="text" name='+t+'[]>';
     $("#"+t).append(htm);
			}
			function show(){
             $("#kuozhan").show();
			}
			function jiacu(){
				var c=$("#mycolor").val();
				if(c!="#ffc000"){
                    c="color:"+c+";";
				}else{
                    c=""; 
				}
             
               var x=$("#b").attr("class");
               if(x=="b"){
            	   $("#title").css("font-weight","");
                   $("#b").removeClass("b");
                   $("input[name='css']").val(c);
               }else{             
               $("#title").css("font-weight","bold");
               $("#b").addClass("b");
               $("input[name='css']").val(c+"font-weight:bold;");
               }
               
			}
			function checktitle(){
				   var t=$("#title").val();
				   $.post("/news/checktitle",{title:t},function(result){
					   if(result.status==true){
						   $("#checktitle").addClass("alert alert-success");
						   }else{
							   $("#checktitle").addClass("alert alert-error");
							   }
					
				    $("#checktitle").html(result.message)
				   },"json")
				}
		</script>


{/literal} {include file="news/top.tpl"} {include file="news/nav.tpl"}
<div id="content" class="span10">


<div class="row-fluid">




			<div class="well"> <!-- Only required for left/right tabs -->
  <ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">{$lang['BASE']}</a></li>
    <li><a href="#tab2" data-toggle="tab">{$lang['EXTEND']}</a></li>
  </ul>
  <div class="tab-content">
   <div class="tab-pane active" id="tab1">


<form action="/factory/save" method="post" enctype="multipart/form-data"
	class="form-inline"><input type="hidden" name="p" value="{$p}"><!-- 存储上一级页数 -->
<input type="hidden" name="preid" value="{$preid}"><!-- 存储上一级页数 --> <!-- 内容// -->

<table class="table">

	<tr>
		<td class="span2">{$lang['TITLE']}</td>
		<td  class="span8"><input type="hidden" name="css" value="" /><input type="text"
			style="" class="input-xxlarge rule" id="title" name="title"
			value="{$news.title}">

		<div id="checktitle"></div>

		</td>
		<td ><a href="javascript:void(0)" onclick="checktitle()"
			style="float: left; line-height: 30px; width: 70px;">[{$lang['CHECK']}]</a>

		<div id="b"
			style="height: 25px; float: left; border: 1px #ccc solid; width: 16px; height: 16px; margin-top: 1px; padding: 3px; margin-right: 10px;"><a
			href="javascript:void(0)" style="width: 20px;" onclick="jiacu()"><b>B</b></a></div>
		</td>

	</tr>
	
		<tr>
		<td >{$lang['SUBTITLE']}</td>
		<td >

<input type="text" name="subtitle"  class="input-xlarge" id="title" value="{$news.subtitle}">
			

			<div  id="checktitle"></div>

	

		</td>
		<td rowspan=4>
	<img src="{$news.thumb}" class="img-polaroid" >
		</td>
	
	
	<tr>
		<td >{$lang['CATE']}</td>
		<td>
		<div>{$category}</div>
		
		</td>
		<td ></td>

	</tr>

	<tr>
		<td>{$lang['FLAG']}</td>
		<td>{foreach from=$flag item=l} <input type="checkbox"
			class="checkbox" value="{$l.flag}" id="{$l.flag}" name="flag[]"
			{range needle=$l.flag haystack=$news.flag}checked{/range}>{$l.name} 
		{/foreach}</td>
		<td>
			
		</td>

	</tr>

	<tr>
		<td>{$lang['THUMB']}</td>
		<td>
		<div class="uploader" id="uniform-fileInput"><input
			class="input-file uniform_on" name="thumb" id="fileInput" type="file"><span
			class="filename" style="-webkit-user-select: none;">No file selected</span><span
			class="action" style="-webkit-user-select: none;">Choose File</span></div>
		<input size="3" type="text" class="input-mini" maxlength="3"
			name="width" value="{if $width!=''}{$width}{else}360{/if}"> x <input
			type="text" class="input-mini" maxlength="3" size="3" name="height"
			value="{if $height!=''}{$height}{else}360{/if}"> 或 <input
			type="checkbox" name="same">{$lang['PIC']}</td>
		


	</tr>